<%@ page language="java" contentType="text/html; charset=UTF-8"	pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page isELIgnored="false"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1.0, maximum-scale=1.0" />
<title>助学跟踪-总表</title>
<%@ include file="../common/_head_include.jsp" %>

<style>
select { margin:0px; padding:0px; }
.aid_statistics { border:1px solid #666; border-collapse:collapse; margin:0px 0px 10px 0px; display:inline-table; }
.aid_statistics td { width:60px; }
.num_aid_confirmed { color:blue; font-weight:bold; }
</style>

<script type="text/javascript">
function switchProject() {
	var projectId = $("#project").val();
	var path = location.pathname + "?projectId=" + projectId;
	debugger;
	location.href = path;
}

$(document).ready(function() {
	$("#bthSwitchProject").click(function(){
		switchProject();
	});
});
</script>

</head>
<body>
<%@ include file="../common/_page_header.jsp" %>

<div id="g_content"><!-- do NOT change it. It's part of the global page structure. -->

<%@ include file="../common/_page_menubar.jsp" %>

<div id="g_workspace"><!-- do NOT change it. It's part of the global page structure. -->

<h3 style="display:inline">助学跟踪 - 总表</h3>
<select id="project">
	<c:forEach var="project" items="${projects}">
	<option value="${project.id}" <c:if test="${project.id==projectId}"> selected="selected"</c:if>>${project.name}
	</c:forEach>
</select>
<span id="bthSwitchProject" class="clickable">切换项目</span>
<br/><br/>

<c:forEach var="aidStat" items="${aidStatList}">
<h4 style="display:inline">${aidStat.semester.name}</h4><br/>

<table class="aid_statistics">
<tr><td colspan="5">助学申请(共${aidStat.applyTotal}人)</td></tr>
<tr><td>已资助</td><td>打款中</td><td>确定资助</td><td>不资助</td><td>待定</td></tr>
<tr><td>${aidStat.applyFunded}</td><td>${aidStat.applyTransferring}</td><td>${aidStat.applyApproved}</td><td>${aidStat.applyCancelled}</td><td>${aidStat.applyUnknown}</td></tr>
</table>

<table class="aid_statistics">
<tr><td colspan="4">结对进展(共资助${aidStat.applyFunded+aidStat.applyTransferring+aidStat.applyApproved}人)</td></tr>
<tr><td>已捐款</td><td>待捐款</td><td>待结对</td><td>无需结对</td></tr>
<tr><td>${aidStat.pairDone}</td><td>${aidStat.pairConfirmed}</td><td>${aidStat.pairWait}</td><td>${aidStat.pairNoNeed}</td></tr>
</table>

<table class="aid_statistics">
<tr><td colspan="3">学生收款证明</td></tr>
<tr><td>已收收据</td><td>已反馈</td><td>待反馈</td></tr>
<tr><td>${aidStat.receiptCollected}</td><td>${aidStat.receiptSent}</td><td>${aidStat.receiptNeedSend}</td></tr>
</table>

<table class="aid_statistics">
<tr><td colspan="3">学期小结</td></tr>
<tr><td>已收小结</td><td>已反馈</td><td>待反馈</td></tr>
<tr><td>${aidStat.summaryCollected}</td><td>${aidStat.summarySent}</td><td>${aidStat.summaryNeedSend}</td></tr>
</table>

<br/><br/>

</c:forEach>


</div>
</div>
<%@ include file="../common/_page_footer.jsp" %>
</body>
</html>